from django.conf.urls import url
from myadmin.views import index,users,type,goods

urlpatterns = [
	url(r'^$', index.index,name="adminindex"),
	#登录模块
	url(r'^login$', index.login, name="myadmin_login"),
	url(r'^dologin$', index.dologin, name="myadmin_dologin"),
	url(r'^logout$', index.logout, name="myadmin_logout"),
	#验证码路由
	url(r'^verify$', index.verify, name="myadmin_verify"),
	#会员信息管理
	url(r'^users/p(?P<pindex>[0-999999])$', users.index,name="myadmin_users_index"),
	url(r'^users/add$', users.add,name="myadmin_users_add"), 
	url(r'^users/insert$', users.insert,name="myadmin_users_insert"),
	url(r'^users/del/(?P<uid>[0-9]+)$', users.delete,name="myadmin_users_del"), 
	url(r'^users/edit/(?P<uid>[0-9]+)$', users.edit,name="myadmin_users_edit"), 
	url(r'^users/changePwd/(?P<uid>[0-9]+)$', users.showPassword,name="myadmin_users_password"), 
	url(r'^users/updatePwd$', users.updatePwd,name="myadmin_users_updatePwd"),
	url(r'^users/update/(?P<uid>[0-9]+)$', users.update,name="myadmin_users_update"),
	#商品类别
	url(r'^type/p(?P<pindex>[0-999999])$', type.index,name="myadmin_type_index"),
	url(r'^type/add/(?P<tid>[0-9]+)$', type.add,name="myadmin_type_add"), 
	url(r'^type/insert$', type.insert,name="myadmin_type_insert"),
	url(r'^type/del/(?P<tid>[0-9]+)$', type.delete,name="myadmin_type_del"), 
	url(r'^type/edit/(?P<tid>[0-9]+)$', type.edit,name="myadmin_type_edit"), 
	url(r'^type/update/(?P<tid>[0-9]+)$', type.update,name="myadmin_type_update"),
	#商品信息管理
	url(r'^goods/p(?P<pindex>[0-999999])$', goods.index,name="myadmin_goods_index"),
	url(r'^goods/add$', goods.add,name="myadmin_goods_add"), 
	url(r'^goods/insert$', goods.insert,name="myadmin_goods_insert"),
	url(r'^goods/del/(?P<gid>[0-9]+)$', goods.delete,name="myadmin_goods_del"), 
	url(r'^goods/edit/(?P<gid>[0-9]+)$', goods.edit,name="myadmin_goods_edit"), 
	url(r'^goods/update/(?P<gid>[0-9]+)$', goods.update,name="myadmin_goods_update"),
	#富文本编辑器
	url(r'^ueditorPage/(?P<gid>[0-9]+)$', goods.editByueidtor,name="ueditorPage"),
	#富文本编辑内容
	url(r'^update_ueditor/(?P<gid>[0-9]+)$', goods.update_ueditor,name="update_ueditor"),
]
